const mongoose = require("mongoose")
const {model, Schema} = mongoose

// 中间表 用于申请加入队伍
const schema = new Schema({
    userID: {
        type: mongoose.Schema.Types.ObjectId, ref: 'User'
    },
    teamID:{
        type: mongoose.Schema.Types.ObjectId, ref: 'Team'
    },
    applyID:{
        type: mongoose.Schema.Types.ObjectId, ref: 'User'
    },
    createTime: {
        type: Date,
        default: new Date()
    },
    updateTime: {
        type: Date,
        default: new Date()
    }
})
const Mid = model("Mid", schema)

module.exports = Mid